let mongoose = require('mongoose');

// 连接
mongoose.connect('mongodb://127.0.0.1:27017/sz2201');
// 连接成功与否
let db = mongoose.connection;
db.on('connected',function(){
	console.log("成功连接数据库")
})
// 导出
module.exports = mongoose;